<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>运营平台</title>


    
	
	
	<import type="css" basepath="__CSS__" file="bootstrap" />
	<import type="css" basepath="__CSS__" file="datetimepicker" />
	<import type="css" basepath="__CSS__" file="fontawesome" />
	<import type="css" basepath="__CSS__" file="fonts" />
	<import type="css" basepath="__CSS__" file="bootgrid" />
	<import type="css" basepath="__CSS__" file="style" />
	<import type="css" basepath="__CSS__" file="newStudentWeb" />
	<import type="css" basepath="__CSS__" file="index" />
	
</head>

<body>
<div class="topNav">
    <span class="text"><i class="iconfont">&#xe607;</i><a href="{:U('Index/index')}" target="_top" >首页</a>&gt;<span>用户管理</span></span>
</div>

<div class="contain">
    <div class="pageTitle">
        <h2 class="title">用户管理</h2>
    </div>
    <div class="searchBox">
        <form action="{:U('Custom/index')}" method="post">
      
            <!-- formOne formTwo formThree formFour(备用) -->
            <div class="formOne formDivide">
			
                <div class="line">
                    <span class="name">学校所在省</span>
                    <div class="col-md-6 col-sm-10 col-xs-8">
                       <select  id="select_id5" class="inpTextOne form-control sel" name="select_name5">
                            <option selected="selected" value=''>请选择</option>
                            <foreach name='listAddress'  item='item'>
                            <option value="{$item['id']}" >{$item['name']}</option>
                            </foreach>
                        </select>
						
                    </div>
                </div>
				
				
                <div class="line">
                    <span class="name">学校所在市</span>
                    <div class="col-md-6 col-sm-10 col-xs-8">
                        <select id="select_id6"  class="inpTextOne form-control sel" name="select_name6">
                           <option selected="selected" value="">请选择</option>
                        </select>
						
                    </div>
                </div>
				
				
                <div class="line">
                    <span class="name">学校名称</span>
                    <div class="col-md-6 col-sm-10 col-xs-8">
                        <select  id="select_id7" class="inpTextOne form-control sel" name="select_name7">
                           <option selected="selected" value="">请选择</option>
                        </select>
                    </div>
                </div>
				
				
				
            </div>
            <div class="formTwo formDivide">
               <div class="line">
                    <span class="name">开店时间</span>
                    <div class="col-md-3 col-sm-5 col-xs-4">
                        <input type="text" name="from_time"  value="{$shArray['from_time']?$shArray['from_time']:''}" class="inpTextOne form-control datetimepicker">
                    </div>
                    <div class="col-md-3 col-sm-5 col-xs-4">
                        <input type="text" name="to_time"  value="{$shArray['to_time']?$shArray['to_time']:''}" class="inpTextOne form-control datetimepicker">
                    </div>
                </div>
               
            </div>
          
            <div class="formFour formDivide">
                <div class="line">
                    <div class="marl85 col-md-9 addPdding">
                        <input type="submit" class="btn btn-success btn-lg" value="查询">
                        <!--<button type="button" class="btn btn-info btn-lg">添加用户</button>-->
                    </div>
                </div>
            </div>
        </form>
    </div>
    <div class="tableBoxOne">
        <div class="pageTitle">
            <h2 class="title">检索结果</h2>
        </div>
        <div class="scroll">
            <table  class="table table-bordered" data-selection="false" data-multi-select="false" data-row-select="false" data-keep-selection="false">
            <thead>
                <tr>
                    <th data-column-id="01" data-width="80" >ID</th>
                    <th data-column-id="02" data-width="150" >手机号</th>
                    <th data-column-id="03" data-width="100">姓名</th>
                   <!-- <th data-column-id="04" data-width="120">密码</th>-->
                    <th data-column-id="05" data-width="120">注册时间</th>
                    <th data-column-id="06" data-width="120">所在省</th>
                    <th data-column-id="07" data-width="120">所在市</th>
                    <th data-column-id="08" data-width="120">学校</th>
                    <th data-column-id="09" data-width="120">年级</th>
                    <th data-column-id="10" data-width="120">性别</th>
                    <th data-column-id="13" data-width="120">历史消费金额</th>
                    <th data-column-id="12" data-width="120">历史订单数量</th>
                    <th data-column-id="12" data-width="120">发布求职次数</th>
                    <th data-column-id="12" data-width="120">发布闲置次数</th>
                    <th data-column-id="12" data-width="120">最近消费日期</th>
                    <th data-column-id="16" data-width="260">操作</th>
                </tr>
                </thead>
                <tbody id="result">
               <foreach name="list" item="item" >
                <tr>
                    <td>{$item.id}</td>
                    <td>{$item.phone}</td>
                    <td>{$item.fullname}</td>
                    <!--  <td>*************</td>-->
                    <td>{$item.add_time|date='Y-m-d',###}</td>
					
                    <td>{$item.provin_name}</td>
                    <td>{$item.city_name}</td>
                    <td>{$item.school_name}</td>
					
                    <td>
					
				     <if condition="$item.std_level eq 1 ">
						 
				   一年级
					<elseif condition="$item.std_level eq 2" />
					二年级
				    <elseif condition="$item.std_level eq 3" />
					  三年级
				    <else/>
					    	四年级
				    </if>
					
					
					</td>
                    <td><if condition="$item.sex eq 0">女<else/>男</if></td>
                    <td>￥{$item.monetary}</td>  
                    <td>{$item.ordernum}</td> 
                    <td>{$item.jobwant_num}</td> 
                    <td>{$item.oldthing_num}</td> 
                    <td>{$item.lastorder_time|date='Y-m-d',###}</td>
                   <td>
                        <a href="http://student.com/adminDtails?id={{$v->id}}">查看</a>
                        <a href="http://student.com/adminEdictor?id={{$v->id}}">编辑</a>
                        <a href="javascript:" class="check" checkinfo="{{$v->checkinfo}}" uid="{{$v->id}}">禁用</a>
                    </td>
                </tr>
              </foreach>
                </tbody>
            </table>
             {$page}
        </div>
    </div>
</div>

<script src="/App/Admin/public/js/jquery-2.1.1.min.js"></script>
<script src="/App/Admin/public/js/bootstrap.min.js"></script>
<script src="/App/Admin/public/js/jquery.datetimepicker.js"></script>
<script src="/App/Admin/public/js/jquery.bootgrid.min.js"></script>
<script src="/App/Admin/public/js/jquery.bootgrid.fa.min.js"></script>
<script src="/App/Admin/public/js/time.js"></script>


<script type="text/javascript">
$('.check').click(function(){
    var t=$(this);
    var text=$(this).html();
    var mymessage=confirm("你确定"+text+"该用户");  
    if(mymessage==true)  
    {  
        var checkinfo=$(this).attr("checkinfo");
        var uid=$(this).attr("uid");
       if(checkinfo==1){
        $(this).attr("checkinfo","0");
        checkinfo=0;
       }else{
        $(this).attr("checkinfo","1");
        checkinfo=1;
       }
          $.get('/adminMange/check',{'checkinfo':checkinfo,'id':uid},function(data){
            if(data==1){
               alert("修改成功");
               if(text=="启用"){
                    t.html("禁用");
               }else{
                    t.html("启用");
               }
            }
        })
    }  
    else if(mymessage==false)  
    {  
        
    }     
})
</script>
<script type="text/javascript">
$(".sel").change(function(){

 var t=$(this);
var checkText=$(this).find("option:selected").text();
var checkValue=$(this).find("option:selected").attr("id");
var tid=$(this).find("option:selected").attr("tid");
      $.get('/type/type',{'id':checkValue,'tid':tid},function(data){
        
            t.parent().parent().next().find("select").html("");
            t.parent().parent().next().find("select").append(data);
            //alert(data);
      })
 
 //alert(checkValue);
});
</script>


<script>
$("#select_id5").change(function(){
var checkValueOne=$("#select_id5").val(); //获取Select选择的Value
/*alert(checkValueOne);die();*/
/*alert(checkValueOne);die();*/
 $.post('{:U('ShopMange/select_address')}',{checkValueOne:checkValueOne},function(data){
               $("#select_id6").text(' ');
               $("#select_id6").append(data);
            
        });
});
</script>


<script>
$("#select_id6").change(function(){
var checkValueOne=$("#select_id6").val(); //获取Select选择的Value
/*alert(checkValueOne);die();*/
 $.post('{:U('ShopMange/select_address')}',{checkValueOne:checkValueOne},function(data){
               $("#select_id7").text(' ');
               $("#select_id7").append(data);
            
        });
});
</script>


</body>

</html>